package com.maimao.goods.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.maimao.model.goods.SpecGroup;
import com.maimao.model.goods.vo.SpecGroupEx;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author MaoLin Wang
 * @date 2020/12/11 8:22 下午
 */
public interface SpecGroupMapper extends BaseMapper<SpecGroup> {
    List<SpecGroup> selectByCateId(@Param("cid") Integer cid);

    int updateGroupOrder(@Param("id") Integer id, @Param("order") Integer order);

    /**
     * 修改规格组名
     */
    int updateGroupName(@Param("id") Integer id, @Param("name") String name);

    List<SpecGroupEx> selectExByCateId(Integer categoryId);

    SpecGroup selectTopOrder(@Param("cid3") Integer cid3, @Param("order") Integer order);

    SpecGroup selectNextOrder(@Param("cid3") Integer cid3, @Param("order") Integer order);
}
